<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html>

<head>
{% block head %}
	
	{% block external_styles %}
    <link rel="stylesheet" type="text/css" href="/static/css/base.css">
    <link href="http://yandex.st/jquery-ui/1.8.15/themes/humanity/jquery.ui.all.min.css" rel="stylesheet" type="text/css" />
    {% endblock %}
    
    <style>
    {% block inline_style_block %}
    	.submit_button {
    		font-weight: 700;
			padding: 4px 5px 4px 5px;
			background: #FFE72E;
			border-color: #FAD000;
    	}
    	.submit_button:hover {
    		background: gold;
    	}
    	
    	/* css for timepicker */
		.ui-timepicker-div .ui-widget-header { margin-bottom: 8px; }
		.ui-timepicker-div dl { text-align: left; }
		.ui-timepicker-div dl dt { height: 25px; margin-bottom: -25px; }
		.ui-timepicker-div dl dd { margin: 0 10px 10px 65px; }
		.ui-timepicker-div td { font-size: 90%; }
		.ui-tpicker-grid-label { background: none; border: none; margin: 0; padding: 0; }
    {% endblock %}
    </style>
    
    {% block external_js %}
    <script src="http://yandex.st/jquery/1.7.1/jquery.min.js"></script>
    <script src="http://yandex.st/jquery-ui/1.8.17/jquery-ui.min.js"></script>
    <script src="http://ajax.aspnetcdn.com/ajax/jquery.validate/1.9/jquery.validate.min.js"></script>
    <script src="/static/js/jquery-ui-timepicker-0.9.9.js"></script>
    {% endblock %}
    
    <script type="text/javascript">
    {% block inline_js %}
    {% endblock %}
    </script>
    
{% endblock head %}
</head>


<body>
{% block body %}
    
    {% block top_bar %}
    <div id="top_container">
        
        <div id="top_container_left">
        {% block top_bar_left %}
        <ul class="top_bar">
           <li class="top_bar {{'active' if request.path == url_for('root')}}">
             <a class="top_bar" href="{{ url_for('root') }}">2root</a>
           </li>
           <li class="top_bar {{'active' if request.path == url_for('lenta.root')}}">
             <a class="top_bar" href="{{url_for('lenta.root')}}">Lentas</a>
           </li>
        </ul>
        {% endblock %}
        </div>
        
        {% block top_bar_user_section  %}
        <div id="user_bar">
          <ul class="top_bar">
            {% if g.user %}
            <li class="top_bar {{'active' if request.path == url_for('user.view_user_data', username=g.user.name)}}">
              <a class="top_bar" href="{{ url_for('user.view_user_data', username=g.user.name) }}">{{ g.user.name  }}</a>
            </li>
            <li class="top_bar"><a class="top_bar" href="{{ c.create_logout_url ('/') }}">logout</a></li>
            {% else %}
            <li class="top_bar"><a class="top_bar" href="{{ c.create_login_url ('/') }}">login</a></li>
            {% endif %}
          </ul> 
        </div>
        {% endblock top_bar_user_section %}
    
    </div>
    {% endblock top_bar %}
	
	<div id="page_content">
    {% block page_content %}{% endblock%}
    </div>

    <div id="footer">
    {% block page_footer %}
    {% endblock page_footer %}
    </div>

{% endblock body %}
</body>

</html>
